<?php 
/* SVN FILE: $Id$ */
/* Ranking Test cases generated on: 2009-10-31 15:36:05 : 1257014165*/
App::import('Model', 'Rankings.Ranking');

class RankingTestCase extends CakeTestCase {
	var $Ranking = null;
	var $fixtures = array('plugin.rankings.ranking');

	function startTest() {
		$this->Ranking =& ClassRegistry::init('Ranking');
	}

	function testRankingInstance() {
		$this->assertTrue(is_a($this->Ranking, 'Ranking'));
	}

	function testRankingFind() {
		$this->Ranking->recursive = -1;
		$results = $this->Ranking->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('Ranking' => array(
			'id'  => 1,
			'title'  => 'Lorem ipsum dolor sit amet',
			'pos_1'  => 'Lorem ipsum dolor sit amet',
			'pos_2'  => 'Lorem ipsum dolor sit amet',
			'pos_3'  => 'Lorem ipsum dolor sit amet',
			'pos_4'  => 'Lorem ipsum dolor sit amet',
			'pos_5'  => 'Lorem ipsum dolor sit amet',
			'pos_6'  => 'Lorem ipsum dolor sit amet',
			'pos_7'  => 'Lorem ipsum dolor sit amet',
			'pos_8'  => 'Lorem ipsum dolor sit amet',
			'pos_9'  => 'Lorem ipsum dolor sit amet',
			'pos_10'  => 'Lorem ipsum dolor sit amet',
			'created'  => '2009-10-31'
		));
		$this->assertEqual($results, $expected);
	}
}
?>